﻿/**
 * 
 * @file   OperVAOnePostDataImport.h
 * @brief  VAOne 后处理数据导入操作
 * @author TanDongYang (tandongyang@diso.cn)
 * @date   2024-11-22
 * 
 */

#ifndef OPERVAONEPOSTDATAIMPORT_H
#define OPERVAONEPOSTDATAIMPORT_H

#include "FITK_Kernel/FITKCore/FITKActionOperator.h"
#include "FITK_Kernel/FITKCore/FITKOperatorRepo.h"
#include "FITK_Kernel/FITKCore/FITKThreadTask.h"

namespace Acoustics
{
    class FITKAcousticsModalDensityManager;
    class FITKAcousticsLossFactorManager;
    class FITKAcousticsAbstractSpectra;
};

namespace ModelOper
{
    class OperVAOnePostDataImport :public Core::FITKActionOperator
    {
        Q_OBJECT
    public:

        /**
         * @brief   Construct a new Oper VAOne PostData Import object
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-22 
         */
        explicit OperVAOnePostDataImport() = default;

        /**
         * @brief   Destroy the Oper VAOne PostData Import object
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-22 
         */
        virtual ~OperVAOnePostDataImport() = default;

        /**
         * @brief   执行GUI操作，选择文件对话框
         * @return  bool
         * @author  liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-02-10
         */
        virtual bool execGUI() override;

        /**
         * @brief   执行业务操作，导入HDF5后处理文件
         * @return  bool
         * @author  liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-02-10
         */
        virtual bool execProfession() override;

    private:
        /**
         * @brief    导入hdf5文件操作
         * @return   bool
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-02-10
         */
        bool importHDF5ResultOper();

    private slots:
        ;
        /**
         * @brief   读取线程结束执行该槽函数
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-22 
         */
        void ioThreadFinishedSlot();

    private:

        /**
         * @brief   清除数据
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-22 
         */
        void clearData();

    };

    // 按钮注册相关操作
    Register2FITKOperatorRepo(actionHDF5Result, OperVAOnePostDataImport);
}
#endif // OPERVAONEPOSTDATAIMPORT_H
